package com.ruoyi.project.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.system.domain.SmCustomizedPrice;
import com.ruoyi.project.system.mapper.SmCustomizedPriceMapper;
import com.ruoyi.project.system.service.ISmCustomizedPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 用户产品定制Service业务层处理
 */
@Service
public class SmCustomizedPriceServiceImpl implements ISmCustomizedPriceService
{
    @Autowired
    private SmCustomizedPriceMapper smCustomizedPriceMapper;

    /**
     * 查询用户产品定制
     * 
     * @param id 用户产品定制主键
     * @return 用户产品定制
     */
    @Override
    public SmCustomizedPrice selectSmCustomizedPriceById(Integer id)
    {
        return smCustomizedPriceMapper.selectSmCustomizedPriceById(id);
    }

    /**
     * 查询用户产品定制列表
     * 
     * @param smCustomizedPrice 用户产品定制
     * @return 用户产品定制
     */
    @Override
    public List<SmCustomizedPrice> selectSmCustomizedPriceList(SmCustomizedPrice smCustomizedPrice)
    {
        return smCustomizedPriceMapper.selectSmCustomizedPriceList(smCustomizedPrice);
    }

    /**
     * 新增用户产品定制
     * 
     * @param smCustomizedPrice 用户产品定制
     * @return 结果
     */
    @Override
    public int insertSmCustomizedPrice(SmCustomizedPrice smCustomizedPrice)
    {
        smCustomizedPrice.setCreateTime(DateUtils.getNowDate());
        return smCustomizedPriceMapper.insertSmCustomizedPrice(smCustomizedPrice);
    }

    /**
     * 修改用户产品定制
     * 
     * @param smCustomizedPrice 用户产品定制
     * @return 结果
     */
    @Override
    public int updateSmCustomizedPrice(SmCustomizedPrice smCustomizedPrice)
    {
        smCustomizedPrice.setUpdateTime(DateUtils.getNowDate());
        return smCustomizedPriceMapper.updateSmCustomizedPrice(smCustomizedPrice);
    }

    /**
     * 批量删除用户产品定制
     * 
     * @param ids 需要删除的用户产品定制主键
     * @return 结果
     */
    @Override
    public int deleteSmCustomizedPriceByIds(Integer[] ids)
    {
        return smCustomizedPriceMapper.deleteSmCustomizedPriceByIds(ids);
    }

    /**
     * 删除用户产品定制信息
     * 
     * @param id 用户产品定制主键
     * @return 结果
     */
    @Override
    public int deleteSmCustomizedPriceById(Integer id)
    {
        return smCustomizedPriceMapper.deleteSmCustomizedPriceById(id);
    }
}
